1. Field of the Invention
The present invention relates to a technique of controlling a plurality of memory cards using a single host controller in a host apparatus having a plurality of card slots.
2. Description of the Related Art
In recent years, as the capacities of memory cards (hereinafter simply referred to as “cards” as appropriate) have been increased, apparatuses that continuously transmit or receive a large amount of data to or from a memory card have been appeared, including a digital camcorder capable of directly writing high-image-quality recorded data into a memory card, and the like. In such apparatuses, for example, when a memory card is full of recorded data, data can no longer be saved or recording can no longer be performed unless the memory card is manually replaced with another memory card. For apparatuses, such as particularly a surveillance camera and the like, in which the continuity of recording is required and no interruption is accepted, it is essentially necessary to write and save recorded data into memory cards without interruption. This can be simply achieved by providing a buffer memory having a large capacity for temporarily storing recorded data, which is significantly disadvantageous in terms of cost.
To solve this problem, a plurality of card slots may be provided in an apparatus. Thereby, while a write operation is being performed with respect to a memory card in one of the slots, card replacement can be performed in another slot. In other words, if a memory card is inserted in at least one of the slots, a destination to which recorded data is written can be secured all the time.
However, a host controller can typically handle and control only one slot, e.g., can issue a command only to one memory card. Therefore, when a plurality of card slots is provided in an apparatus, the same number of host controllers as the number of slots need to be provided, where one host controller is dedicated to control one slot. However, when a plurality of host controllers are provided, the area of a chip is increased in addition to an increase of the cost of the host controllers themselves, which is significantly disadvantageous in terms of cost.
To solve this problem, Japanese Unexamined Patent Application Publication No. 2006-24217 discloses a host apparatus that comprises means for handling a plurality of card slots using a single host controller. Specifically, a selector for switching slots to which the host controller is to be connected is provided. The selector is operated with appropriate timing to switch the slots, so that a plurality of memory cards inserted in the slots can be simultaneously used without replacement. Thereby, a plurality of slots can be controlled without providing a plurality of host controllers, so that, even if a memory card is full, data can be continuously written into another memory card that is previously inserted in another slot.
However, the above-described conventional technique has the following problems.
In general, a memory card cannot be used immediately after being inserted into a slot. The memory card needs to be initialized, i.e., a plurality of commands for initialization need to be issued to the memory card in accordance with a predetermined sequence. Further, a process of reading a file allocation table (FAT) and the like need to be performed. Only after these processes are performed, data can be written into the memory card. Therefore, writing is interrupted during card initialization and FAT reading, which are performed after a memory card becomes full and before another memory card gets ready for writing.
Even if a memory card to be next used is initialized before a currently used memory card becomes full, but not immediately before writing, writing is interrupted. This is because a plurality of memory cards cannot be simultaneously accessed in the above-described conventional technique, and therefore, writing to a memory card and initialization of another memory card cannot be simultaneously performed. Similarly, reading needs to be interrupted.
In other words, in the above-described conventional technique, interruption of writing can be avoided during replacement of a memory card, but interruption of writing cannot be avoided until a new memory card gets ready for writing. Note that, in the case of an SD (Secure Digital) card, it takes about one second to initialize the card. Taking a FAT reading process into consideration as well, it takes at least about three seconds for the card to get ready for writing. Therefore, a large-capacity buffer memory capable of saving 3-second data needs to be provided.